home *** CD-ROM | disk | FTP | other *** search
- /*
- File: FramePE.h
-
- Contains: Frame Class Definition
-
- Written by: Steve Smith
-
- Copyright: © 1995 by Apple Computer, Inc., all rights reserved.
- */
-
- #ifndef _FRAMEPE_
- #define _FRAMEPE_
-
- // -- PanelEditor Includes --
-
- #ifndef _SAMPLECOLLECTIONS_
- #include "SampleCollections.h"
- #endif
-
- // -- OpenDoc Includes --
-
- #ifndef _ODTYPES_
- #include <ODTypes.h>
- #endif
-
-
- class CListItem;
- class ODPart;
- class ODFrame;
- class ODFacet;
-
- //=============================================================================
- // CFrame
- //=============================================================================
- class CFrame
- {
- public:
-
- // --- Init ---
- CFrame();
- virtual ~CFrame();
- virtual void InitFrame();
-
- // --- Layout ---
- virtual void RemoveAll(Environment* ev);
- virtual void AddFrame(Environment* ev, ODFrame* containingFrame);
- virtual void RemoveFrame(Environment* ev, ODFrame* containingFrame);
- virtual void CloseFrame(Environment* ev, ODFrame* containingFrame);
- virtual void Resize(Environment* ev, ODFrame* containingFrame);
- virtual void AttachSourceFrame(Environment* ev, ODFrame* frame, ODFrame* src);
-
- // --- Imaging ---
- virtual void AddFacet(Environment* ev, ODFacet* containgingFacet);
- virtual void AddFacet(Environment* ev, ODFacet* containgingFacet,
- ODFrame* frame);
- virtual void RemoveFacet(Environment* ev, ODFacet* containgingFacet);
- virtual void RemoveFacet(Environment* ev, ODFacet* containgingFacet,
- ODFacet* facet);
- virtual void AddFacets(Environment* ev, ODFrame* containingFrame);
- virtual void RemoveFacets(Environment* ev, ODFrame* containingFrame);
-
- protected:
-
- // --- Getters ---
- virtual ODRect GetFrameBounds(Environment* ev, ODFrame* containingFrame) = 0;
- virtual Point GetFrameOffset() = 0;
- virtual ODTypeToken GetPresentation() = 0;
- virtual ODBoolean MakeSubframe() = 0;
- virtual ODObjectType GetFrameType() = 0;
-
- // --- Layout ---
- virtual void CreateFrames(Environment* ev);
- virtual void CreateFacets(Environment* ev);
- virtual void NewFrame(Environment* ev, ODFrame* containingFrame);
- virtual void PrepareFrame(Environment* ev, ODFrame* frame);
- virtual void CleanupFrame(Environment* ev, ODFrame* frame, ODBoolean frameRemoved);
-
- // --- Imaging ---
- virtual void PrepareFacet(Environment* ev, ODFacet* facet);
- virtual void CleanupFacet(Environment* ev, ODFacet* facet);
- virtual void FacetChanged(Environment* ev, ODFacet* facet);
-
- // --- Members ---
-
- ODBoolean fInited;
- CFrameList* fContainingFrames;
- CFrameList* fFrames;
- ODPart* fPartDisplayed;
-
- };
-
-
- //--------------------------------------------------------------------------
- // Inlines
- //--------------------------------------------------------------------------
-
- inline void CFrame::CleanupFrame(Environment* ev, ODFrame* frame, ODBoolean frameRemoved)
- { /* no implementation */; }
-
- inline void CFrame::PrepareFrame(Environment* ev, ODFrame* frame)
- { /* no implementation */; }
-
- inline void CFrame::PrepareFacet(Environment* ev, ODFacet* facet)
- { /* no implementation */; }
-
- inline void CFrame::CleanupFacet(Environment* ev, ODFacet* facet)
- { /* no implementation */; }
-
- inline void CFrame::FacetChanged(Environment* ev, ODFacet* facet)
- { /* no implementation */; }
-
-
-
- #endif